<?php
class AdminAction{
	public $data;
	public $lang;
	
	function __construct(){
		$this->loadData();
		$this->init();
	}
	
	function init(){
		$this->getMenuList();
	}
	
	function loadData(){
		global $sysinfo;
		$this->data = array();
		$this->data['sysinfo'] = $sysinfo;
	}
	
	function getMenuList(){
		$menustr = getCk('menulist');
		$this->data['menulist'] = $menustr;
	}
	
	function getDB(){
		require 'config/database.php';
		require 'include/mysql.php';
		return $db = new mysql($dbhost, $dbuser, $dbpw, $dbname, $pconnect,$charset);
	}
	
	function loadLib($lib){
		require 'include/lib/'.$lib.'.php';
		$lib = ucfirst($lib);
		return $lb = new $lib();
	}
	
	function ajaxMsg($type,$msg){
		$message = array();
		$message['type'] = $type;
		$message['msg'] = $msg;
		echo json_encode($message);
	}
	

	
}